<?php

header('Content-Type:text/html; charset=utf-8');

echo '<h3>Ob_start()</h3>';

ob_start(); 

echo 'Conteudo a ser executado normalmente pelo script!';

echo '<br />';

$x = 1;
$y = 2;

$soma = $x + $y;

echo 'Soma entre $x = 1 + $y = 2: ' . $soma;

$buffer = ob_get_clean();

echo $buffer;

echo '<hr />';

echo '<h4>Código:</h4>';
show_source(__FILE__);